Optimal. Leaf size=65 \[ -\frac {3 \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {3 i \sec (c+d x)}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3581, 3582,
3855} \begin {gather*} \frac {3 i \sec (c+d x)}{a^3 d}-\frac {3 \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3581
Rule 3582
Rule 3855
Rubi steps
\begin {align*} \int \frac {\sec ^5(c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2}-\frac {3 \int \frac {\sec ^3(c+d x)}{a+i a \tan (c+d x)} \, dx}{a^2}\\ &=\frac {3 i \sec (c+d x)}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2}-\frac {3 \int \sec (c+d x) \, dx}{a^3}\\ &=-\frac {3 \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {3 i \sec (c+d x)}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.38, size = 108, normalized size = 1.66 \begin {gather*} \frac {\sec ^3(c+d x) (i \cos (d x)-\sin (d x))^3 \left (6 \tanh ^{-1}\left (\sin (c)+\cos (c) \tan \left (\frac {d x}{2}\right )\right ) (\cos (3 c)+i \sin (3 c))+(\cos (2 c-d x)+i \sin (2 c-d x)) (-5 i+\tan (c+d x))\right )}{a^3 d (-i+\tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 86, normalized size = 1.32
method | result | size |
derivativedivides | \(\frac {-\frac {i}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {2 i}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}-3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\frac {8}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{3} d}\) | \(86\) |
default | \(\frac {-\frac {i}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {2 i}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}-3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\frac {8}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{3} d}\) | \(86\) |
risch | \(\frac {4 i {\mathrm e}^{-i \left (d x +c \right )}}{a^{3} d}+\frac {2 i {\mathrm e}^{i \left (d x +c \right )}}{d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{3} d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{3} d}\) | \(93\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 319 vs. \(2 (59) = 118\).
time = 0.52, size = 319, normalized size = 4.91 \begin {gather*} \frac {6 \, {\left (\cos \left (3 \, d x + 3 \, c\right ) + \cos \left (d x + c\right ) + i \, \sin \left (3 \, d x + 3 \, c\right ) + i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) + 6 \, {\left (\cos \left (3 \, d x + 3 \, c\right ) + \cos \left (d x + c\right ) + i \, \sin \left (3 \, d x + 3 \, c\right ) + i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), -\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (i \, \cos \left (3 \, d x + 3 \, c\right ) + i \, \cos \left (d x + c\right ) - \sin \left (3 \, d x + 3 \, c\right ) - \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (-i \, \cos \left (3 \, d x + 3 \, c\right ) - i \, \cos \left (d x + c\right ) + \sin \left (3 \, d x + 3 \, c\right ) + \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1\right ) + 12 \, \cos \left (2 \, d x + 2 \, c\right ) + 12 i \, \sin \left (2 \, d x + 2 \, c\right ) + 8}{-2 \, {\left (i \, a^{3} \cos \left (3 \, d x + 3 \, c\right ) + i \, a^{3} \cos \left (d x + c\right ) - a^{3} \sin \left (3 \, d x + 3 \, c\right ) - a^{3} \sin \left (d x + c\right )\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 112, normalized size = 1.72 \begin {gather*} -\frac {3 \, {\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3 \, {\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 6 i \, e^{\left (2 i \, d x + 2 i \, c\right )} - 4 i}{a^{3} d e^{\left (3 i \, d x + 3 i \, c\right )} + a^{3} d e^{\left (i \, d x + i \, c\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {i \int \frac {\sec ^{5}{\left (c + d x \right )}}{\tan ^{3}{\left (c + d x \right )} - 3 i \tan ^{2}{\left (c + d x \right )} - 3 \tan {\left (c + d x \right )} + i}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.73, size = 110, normalized size = 1.69 \begin {gather*} -\frac {\frac {3 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{3}} - \frac {3 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{3}} - \frac {2 \, {\left (4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )} a^{3}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.77, size = 105, normalized size = 1.62 \begin {gather*} -\frac {6\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^3}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,8{}\mathrm {i}}{a^3}-\frac {10{}\mathrm {i}}{a^3}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,1{}\mathrm {i}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________